#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "PicturesView.h"
#include <QPropertyAnimation>

class MainWindow : public QMainWindow
{
    Q_OBJECT
public:
    explicit MainWindow(QWidget *parent = 0, int viewMode=0);
    virtual ~MainWindow();

    void initialize();
    void clear();
    static int  getViewMode();
    static void setPortraitMode();
    static void setLandscapeMode();
protected:
    virtual void mouseMoveEvent ( QMouseEvent * event );
    virtual void mousePressEvent ( QMouseEvent * event );
    virtual void mouseReleaseEvent ( QMouseEvent * event );
signals:
    void viewChange(bool viewMode);
    void closeFinish();
public slots:
    void viewChanged(bool viewMode);
    void finishScale();
    void closeWindow();
private:

    QPoint      mMousePos;
    static int  mViewMode;

    QGraphicsScene* mScene;
    PicturesView* mView;
    QPropertyAnimation* mSizeAnim;
};

#endif // MAINWINDOW_H
